
namespace Himall.Entity
{
    using System;
    using System.Collections.Generic;
    /// <summary>
    /// 订单表
    /// </summary>
    public partial class OrderInfo:BaseModel
    {      
    
        long _id;
        public new long Id { get{ return _id; } set{ _id=value; base.Id = value; } }
        /// <summary>
        /// 订单状态 [Description("待付款")]WaitPay = 1,[Description("待发货")]WaitDelivery,[Description("待收货")]WaitReceiving,[Description("已关闭")]Close,[Description("已完成")]Finish
        /// </summary>
        public OrderOperateStatus OrderStatus { get; set; }
        /// <summary>
        /// 订单创建日期
        /// </summary>
        public System.DateTime OrderDate { get; set; }
        /// <summary>
        /// 关闭原因
        /// </summary>
        public string CloseReason { get; set; }
        public long ShopId { get; set; }
        public string ShopName { get; set; }
        /// <summary>
        /// 商家电话
        /// </summary>
        public string SellerPhone { get; set; }
        /// <summary>
        /// 商家发货地址
        /// </summary>
        public string SellerAddress { get; set; }
        /// <summary>
        /// 商家说明
        /// </summary>
        public string SellerRemark { get; set; }
        public long UserId { get; set; }
        /// <summary>
        /// 会员名称
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 会员留言
        /// </summary>
        public string UserRemark { get; set; }
        /// <summary>
        /// 收货人
        /// </summary>
        public string ShipTo { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        public string CellPhone { get; set; }
        /// <summary>
        /// 收货人地址省份ID
        /// </summary>
        public int TopRegionId { get; set; }
        /// <summary>
        /// 收货人区域ID
        /// </summary>
        public int RegionId { get; set; }
        /// <summary>
        /// 全名的收货地址
        /// </summary>
        public string RegionFullName { get; set; }
        /// <summary>
        /// 收货具体街道信息
        /// </summary>
        public string Address { get; set; }
        /// <summary>
        /// 快递公司
        /// </summary>
        public string ExpressCompanyName { get; set; }
        /// <summary>
        /// 运费
        /// </summary>
        public decimal Freight { get; set; }
        /// <summary>
        /// 物流订单号
        /// </summary>
        public string ShipOrderNumber { get; set; }
        /// <summary>
        /// 发货日期
        /// </summary>
        public Nullable<System.DateTime> ShippingDate { get; set; }
        /// <summary>
        /// 预计到货时间日期
        /// </summary>
        public Nullable<System.DateTime> EstimatedDeliveryTime { get; set; }
        /// <summary>
        /// 是否打印快递单
        /// </summary>
        public bool IsPrinted { get; set; }
        /// <summary>
        /// 付款类型名称
        /// </summary>
        public string PaymentTypeName { get; set; }
        /// <summary>
        /// 付款类型使用 插件名称
        /// </summary>
        public string PaymentTypeGateway { get; set; }
        /// <summary>
        /// 支付接口返回的ID
        /// </summary>
        public string GatewayOrderId { get; set; }
        /// <summary>
        /// 付款注释
        /// </summary>
        public string PayRemark { get; set; }
        /// <summary>
        /// 付款日期
        /// </summary>
        public Nullable<System.DateTime> PayDate { get; set; }
        /// <summary>
        /// 发票抬头
        /// </summary>
        public string InvoiceTitle { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string InvoiceCode { get; set; }
        /// <summary>
        /// 税钱，但是未使用
        /// </summary>
        public decimal Tax { get; set; }
        /// <summary>
        /// 完成订单日期
        /// </summary>
        public Nullable<System.DateTime> FinishDate { get; set; }
        /// <summary>
        /// 商品总金额
        /// </summary>
        public decimal ProductTotalAmount { get; set; }
        /// <summary>
        /// 退款金额
        /// </summary>
        public decimal RefundTotalAmount { get; set; }
        /// <summary>
        /// 佣金总金额
        /// </summary>
        public decimal CommisTotalAmount { get; set; }
        /// <summary>
        /// 退还佣金总金额
        /// </summary>
        public decimal RefundCommisAmount { get; set; }
        public ActiveTypes ActiveType { get; set; }
        /// <summary>
        /// 来自哪个终端的订单
        /// </summary>
        public Himall.Core.PlatformType Platform { get; set; }
        /// <summary>
        /// 针对该订单的优惠金额（用于优惠券）
        /// </summary>
        public decimal DiscountAmount { get; set; }
        /// <summary>
        /// 发票类型
        /// </summary>
        public InvoiceType InvoiceType { get; set; }
        /// <summary>
        /// 积分优惠金额
        /// </summary>
        public decimal IntegralDiscount { get; set; }
        /// <summary>
        /// 发票明细
        /// </summary>
        public string InvoiceContext { get; set; }
        /// <summary>
        /// 订单类型
        /// </summary>
        public OrderTypes? OrderType { get; set; }
        /// <summary>
        /// 支付方式
        /// </summary>
        public Himall.Entity.PaymentTypes PaymentType { get; set; }
        /// <summary>
        /// 分销员Id
        /// </summary>
        public long? ShareUserId { get; set; }
        /// <summary>
        /// 订单备注(买家留言)
        /// </summary>
        public string OrderRemarks { get; set; }
        /// <summary>
        /// 最后操作时间
        /// </summary>
        public Nullable<System.DateTime> LastModifyTime { get; set; }
        /// <summary>
        /// 发货类型(快递配送,到店自提)
        /// </summary>
        public Himall.CommonModel.Enum.DeliveryType DeliveryType { get; set; }
        /// <summary>
        /// 门店ID
        /// </summary>
        public Nullable<long> ShopBranchId { get; set; }
        /// <summary>
        /// 提货码
        /// </summary>
        public string PickupCode { get; set; }
        public Nullable<int> SellerRemarkFlag { get; set; }
        /// <summary>
        /// 订单实付金额
        /// </summary>
        public decimal TotalAmount { get; set; }
        /// <summary>
        /// 订单实收金额
        /// </summary>
        public decimal ActualPayAmount { get; set; }
        /// <summary>
        /// 满额减金额
        /// </summary>
        public decimal FullDiscount { get; set; }
        public decimal CapitalAmount { get; set; }
        /// <summary>
        /// 经度
        /// </summary>
        public float ReceiveLongitude { get; set; }
        /// <summary>
        /// 纬度
        /// </summary>
        public float ReceiveLatitude { get; set; }
        /// <summary>
        /// 生成订单的平台Key
        /// </summary>
        public string PlatId { get; set; }
    
        public virtual ICollection<OrderComplaintInfo> OrderComplaintInfo { get; set; } = new HashSet<OrderComplaintInfo>();
        public virtual ICollection<OrderItemInfo> OrderItemInfo { get; set; } = new HashSet<OrderItemInfo>();
        public virtual ICollection<OrderOperationLogInfo> OrderOperationLogInfo { get; set; } = new HashSet<OrderOperationLogInfo>();
        public virtual ICollection<OrderCommentInfo> OrderCommentInfo { get; set; } = new HashSet<OrderCommentInfo>();
    }
}
